![]() |
SetControlData |
||||
Header: | Controls.h | Carbon status: | Supported | |
Sets control-specific data.
OSErr SetControlData ( ControlRef inControl, ControlPartCode inPart, ResType inTagName, Size inSize, void *inData );
A handle to the control for which data is to be set.
The part code of the control part for which data is to be set; see
A constant representing the control-specific data you wish to set; see the data tag constants in the “Control Manager Constants” section.
The size (in bytes) of the data pointed to by the inData parameter. For variable-length control data, pass the value returned in the outMaxSize parameter of GetControlDataSize in the inSize parameter. The number of bytes must match the actual data size.
A pointer to a buffer allocated by your application. This buffer contains the data that you are sending to the control. After calling SetControlData, your application is responsible for disposing of this buffer, if necessary, as information is copied by control.
A result code. The result code errDataNotSupported indicates that the inTagName parameter is not valid.
The SetControlData function sets control-specific data represented by the value in the inTagName parameter to the data pointed to by the inData parameter. SetControlData could be used, for example, to switch a progress indicator from a determinate to indeterminate state. For a list of the control attributes that can be set, see the data tag constants in the “Control Manager Constants” section.
This function is available with Appearance Manager 1.0 and later.
Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.
© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)